<?php 
require_once('autoloader.php');
include("dailypenfunctions.php"); 
include("rss.php"); 
include("twitterBETA.php"); 


// GLOBAL VARS
$version = "0.11.1.10002";
$GLOBALS['errors'] = "";
$now = new DateTime();
$now->setTimezone(new DateTimeZone('America/Montreal'));
$formatted = $now->format('Y-m-d')."T".$now->format('H:i:s').".000Z";

echo "<html>\r\n";
echo "<head>\r\n";
echo "<title>Unit Twitter, ".$now->format('F j')."</title>\r\n";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html\" charset=\"UTF-8\" />\r\n";
echo "<meta property=\"og:title\" content=\"The Daily Pen\" />\r\n";
echo "<meta property=\"og:type\" content=\"article\" />\r\n";
echo "<meta property=\"og:url\" content=\"http://www.touzel.com/daily.php\" />\r\n";
echo "<meta HTTP-EQUIV=\"CACHE-CONTROL\" content=\"NO-CACHE\" />\r\n";
echo "<meta HTTP-EQUIV=\"PRAGMA\" content=\"NO-CACHE\" />\r\n";
echo "<meta HTTP-EQUIV=\"Expires\" content=\"-1\" />\r\n";
echo "<meta HTTP-EQUIV=\"cache-control\" content=\"max-age=0\" />\r\n";
echo "<meta property=\"og:image\" content=\"http://www.touzel.com/logo2.png\" />\r\n";
echo "<meta property=\"author\" content=\"Christian Touzel\">\r\n";
echo "<meta property=\"version\" content=\"".$version."\">\r\n";
echo "<meta property=\"article:published_time\" content=\"".$formatted."\" />\r\n";
echo "<meta property=\"article:modified_time\" content=\"".$formatted."\" />\r\n";
echo "</head>\r\n";
echo "<body>\r\n";
echo "<article>\r\n";
echo "<h1>Unit Twitter - ".$now->format('F j')."</h1>\r\n";
echo "<section>\r\n";


// TWITTER TEST 1
echo "<h3>TWITTER - TEST 1</h3>".GetTwitterTimeline();

// TWITTER TEST 1
echo "<h3>TWITTER - TEST 2</h3>".GetTwitterTest2();


// LOG REPORTS
echo "<h3>ERRORS REPORT</h3>";
echo $GLOBALS['errors'];
echo "<p style='font-size: 80%;'>The Daily Pen ".$version." is a creation of Christian Touzel. ";
echo "Page generated on ".$now->format('F j, Y H:i:s').". PHP version is ".phpversion()."</p>";

?>
</section>
</article>
</body>
</html>